Skip to content

Update eslint-plugin-promise version to 6.0.0#20229

Merged
jeremymeng merged 2 commits intoAzure:mainfrom
hamsa-s:issue-19220
Feb 22, 2022
Merged

Update eslint-plugin-promise version to 6.0.0#20229
jeremymeng merged 2 commits intoAzure:mainfrom
hamsa-s:issue-19220

Conversation

@hamsa-s
Copy link
Copy Markdown
Contributor

@hamsa-s hamsa-s commented Feb 6, 2022

This fixes issue #19220 by updating the eslint-plugin-promise version to 6.0.0 in common/tools/eslint-plugin-azure-sdk/package.json

Here are the steps I took to solve the issue:
After changing the dependency version, I ran rush update to install the new version, then rush lint to make sure the eslint-plugin was working with no errors.

Please let me know if there is anything else I should do for this issue.

@ghost ghost added eslint plugin customer-reported Issues that are reported by GitHub users external to the Azure organization. labels Feb 6, 2022
@ghost
Copy link
Copy Markdown

ghost commented Feb 6, 2022

Thank you for your contribution hamsa-s! We will review the pull request and get back to you soon.

@ghost ghost added the Impact++ This pull request was submitted by a member of the Impact++ team. label Feb 6, 2022
@witemple-msft
Copy link
Copy Markdown
Member

@hamsa-s Our build system requires the lockfile to be updated in PRs. You can update it by running rush update from the CLI and then committing the resulting common/config/rush/pnpm-lock.yml file.

@hamsa-s
Copy link
Copy Markdown
Contributor Author

hamsa-s commented Feb 16, 2022

I'm getting some errors when I run rush update which is preventing me from updating the /pnpm-lock.yml file. I've copied the message I see below. If anyone has any ideas, I'm willing to try them out. I am using a MacBook in case it makes a difference.

node_modules/.pnpm/@Azure+msal-node-extensions@1.0.0-alpha.13/node_modules/@azure/msal-node-extensions: node_modules/.pnpm/@Azure+msal-node-extensions@1.0.0-alpha.13/node_modules/@azure/msal-node-extensions: Running install script, failed in 1.5s
.../@azure/msal-node-extensions install$ node-gyp rebuild
│ gyp info it worked if it ends with ok
│ gyp info using node-gyp@8.3.0
│ gyp info using node@17.0.0 | darwin | x64
│ gyp info find Python using Python version 3.9.7 found at "/Users/hamsa/anaconda3/bin/python3"
│ gyp info spawn /Users/hamsa/anaconda3/bin/python3
│ gyp info spawn args [
│ gyp info spawn args '/Users/hamsa/.rush/node-v17.0.0/pnpm-6.19.1/node_modules/pnpm/dist/node_modul
│ gyp info spawn args 'binding.gyp',
│ gyp info spawn args '-f',
│ gyp info spawn args 'make',
│ gyp info spawn args '-I',
│ gyp info spawn args '/Users/hamsa/VSCode/azure-sdk-for-js/common/temp/node_modules/.pnpm/@Azure+ms
│ gyp info spawn args '-I',
│ gyp info spawn args '/Users/hamsa/.rush/node-v17.0.0/pnpm-6.19.1/node_modules/pnpm/dist/node_modul
│ gyp info spawn args '-I',
│ gyp info spawn args '/Users/hamsa/Library/Caches/node-gyp/17.0.0/include/node/common.gypi',
│ gyp info spawn args '-Dlibrary=shared_library',
│ gyp info spawn args '-Dvisibility=default',
│ gyp info spawn args '-Dnode_root_dir=/Users/hamsa/Library/Caches/node-gyp/17.0.0',
│ gyp info spawn args '-Dnode_gyp_dir=/Users/hamsa/.rush/node-v17.0.0/pnpm-6.19.1/node_modules/pnpm/
│ gyp info spawn args '-Dnode_lib_file=/Users/hamsa/Library/Caches/node-gyp/17.0.0/<(target_arch)/no
│ gyp info spawn args '-Dmodule_root_dir=/Users/hamsa/VSCode/azure-sdk-for-js/common/temp/node_modul
│ gyp info spawn args '-Dnode_engine=v8',
│ gyp info spawn args '--depth=.',
│ gyp info spawn args '--no-parallel',
│ gyp info spawn args '--generator-output',
│ gyp info spawn args 'build',
│ gyp info spawn args '-Goutput_dir=.'
│ gyp info spawn args ]
│ No receipt for 'com.apple.pkg.CLTools_Executables' found at '/'.
│ No receipt for 'com.apple.pkg.DeveloperToolsCLILeo' found at '/'.
│ No receipt for 'com.apple.pkg.DeveloperToolsCLI' found at '/'.
│ gyp info spawn make
│ gyp info spawn args [ 'BUILDTYPE=Release', '-C', 'build' ]
│ CXX(target) Release/obj.target/dpapi/src/dpapi-addon/main.o
│ In file included from ../src/dpapi-addon/main.cpp:6:
│ In file included from ../../../../../nan@2.15.0/node_modules/nan/nan.h:58:
│ In file included from /Users/hamsa/Library/Caches/node-gyp/17.0.0/include/node/node.h:63:
│ In file included from /Users/hamsa/Library/Caches/node-gyp/17.0.0/include/node/v8.h:25:
│ In file included from /Users/hamsa/Library/Caches/node-gyp/17.0.0/include/node/v8-array-buffer.h:13:
│ In file included from /Users/hamsa/Library/Caches/node-gyp/17.0.0/include/node/v8-object.h:10:
│ /Users/hamsa/Library/Caches/node-gyp/17.0.0/include/node/v8-persistent-handle.h:10:10: fatal error:
│ #include "v8-weak-callback-info.h" // NOLINT(build/include_directory)
│ ^~~~~~~~~~~~~~~~~~~~~~~~~
│ 1 error generated.
│ make: *** [Release/obj.target/dpapi/src/dpapi-addon/main.o] Error 1
│ gyp ERR! build error
│ gyp ERR! stack Error: make failed with exit code: 2
│ gyp ERR! stack at ChildProcess.onExit (/Users/hamsa/.rush/node-v17.0.0/pnpm-6.19.1/node_modules/
│ gyp ERR! stack at ChildProcess.emit (node:events:390:28)
│ gyp ERR! stack at Process.ChildProcess._handle.onexit (node:internal/child_process:290:12)
│ gyp ERR! System Darwin 20.6.0
│ gyp ERR! command "/usr/local/bin/node" "/Users/hamsa/.rush/node-v17.0.0/pnpm-6.19.1/node_modules/pnp
│ gyp ERR! cwd /Users/hamsa/VSCode/azure-sdk-for-js/common/temp/node_modules/.pnpm/@Azure+msal-node-ex
│ gyp ERR! node -v v17.0.0
│ gyp ERR! node-gyp -v v8.3.0
│ gyp ERR! not ok
└─ Failed in 1.5s
 ELIFECYCLE  Command failed with exit code 1.

The command failed:
/Users/hamsa/VSCode/azure-sdk-for-js/common/temp/pnpm-local/node_modules/.bin/pnpm install --store /Users/hamsa/VSCode/azure-sdk-for-js/common/temp/pnpm-store --no-prefer-frozen-lockfile --strict-peer-dependencies
ERROR: Error: The command failed with exit code 1

Giving up after 3 attempts

@witemple-msft
Copy link
Copy Markdown
Member

@hamsa-s That's strange. There are some packages that require C/C++ build tools, but as far as I can tell, the error seems to indicate that you do have Apple's toolchain installed. What version of Node are you using, and did you happen to run that command in a VS Code JavaScript Debug Terminal?

@hamsa-s
Copy link
Copy Markdown
Contributor Author

hamsa-s commented Feb 16, 2022

I was using the latest version of node (v17) and running it in my terminal. I think it was the node version that was causing the error since I tried with v16 and it worked. Thanks @witemple-msft and @jeremymeng!

@witemple-msft
Copy link
Copy Markdown
Member

@hamsa-s OK, that's great to know, thanks! While we only claim to support LTS versions of Node, we actually should support 17 as well. It's troubling that it doesn't work with Node 17 (and will be a problem if it doesn't work with Node 18 when it is released as LTS). Could I ask you to create an issue in the repo that includes the above information, the error, and all relevant version numbers (for Node, NPM, Python, and macOS).

@jeremymeng
Copy link
Copy Markdown
Member

After changing the dependency version, I ran rush update to install the new version, then rush link, and finally rush build to ensure that the repository could still be built with the changes.

@hamsa-s Is rush lint also passing? And a side node: normally rush update is enough, and you don't need to run rush link.

@hamsa-s
Copy link
Copy Markdown
Contributor Author

hamsa-s commented Feb 16, 2022

@jeremymeng yes rush lint is also passing. I was running rush link and rush build before because I was getting errors with rush update but using Node 16, it works as expected. I've updated the PR description now with the new steps

Copy link
Copy Markdown
Member

@jeremymeng jeremymeng left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great! Looks good to me as long as linting is passing. Thank you very much for the upgrade and filling the build issue!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

customer-reported Issues that are reported by GitHub users external to the Azure organization. eslint plugin Impact++ This pull request was submitted by a member of the Impact++ team.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants